.class public Lcom/htc/android/footprints/activity/EditLocationActivity;
.super Landroid/app/Activity;
.source "EditLocationActivity.java"


# static fields
.field private static final TAG:Ljava/lang/String; = "EditLocationActivity"


# instance fields
.field private mButtonCancel:Landroid/widget/Button;

.field private mButtonDone:Landroid/widget/Button;

.field private mButtonLat:Landroid/widget/Button;

.field private mButtonLon:Landroid/widget/Button;

.field private mEditDegLat:Landroid/widget/EditText;

.field private mEditDegLon:Landroid/widget/EditText;

.field private mEditMinLat:Landroid/widget/EditText;

.field private mEditMinLon:Landroid/widget/EditText;

.field private mEditSecLatDec:Landroid/widget/EditText;

.field private mEditSecLatInt:Landroid/widget/EditText;

.field private mEditSecLonDec:Landroid/widget/EditText;

.field private mEditSecLonInt:Landroid/widget/EditText;

.field private mEditTexts:[Landroid/widget/EditText;

.field private mLat:I

.field private mLon:I

.field private mTextE:Ljava/lang/String;

.field private mTextN:Ljava/lang/String;

.field private mTextS:Ljava/lang/String;

.field private mTextW:Ljava/lang/String;

.field private onCancelClickListener:Landroid/view/View$OnClickListener;

.field private onDoneClickListener:Landroid/view/View$OnClickListener;

.field private onNewsClickListener:Landroid/view/View$OnClickListener;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 17
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 234
    new-instance v0, Lcom/htc/android/footprints/activity/EditLocationActivity$1;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/EditLocationActivity$1;-><init>(Lcom/htc/android/footprints/activity/EditLocationActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onNewsClickListener:Landroid/view/View$OnClickListener;

    .line 250
    new-instance v0, Lcom/htc/android/footprints/activity/EditLocationActivity$2;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/EditLocationActivity$2;-><init>(Lcom/htc/android/footprints/activity/EditLocationActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onDoneClickListener:Landroid/view/View$OnClickListener;

    .line 262
    new-instance v0, Lcom/htc/android/footprints/activity/EditLocationActivity$3;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/EditLocationActivity$3;-><init>(Lcom/htc/android/footprints/activity/EditLocationActivity;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onCancelClickListener:Landroid/view/View$OnClickListener;

    return-void
.end method

.method static synthetic access$000(Lcom/htc/android/footprints/activity/EditLocationActivity;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 17
    iget-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextN:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$100(Lcom/htc/android/footprints/activity/EditLocationActivity;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 17
    iget-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextS:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$200(Lcom/htc/android/footprints/activity/EditLocationActivity;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 17
    iget-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextE:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$300(Lcom/htc/android/footprints/activity/EditLocationActivity;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 17
    iget-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextW:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$400(Lcom/htc/android/footprints/activity/EditLocationActivity;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 17
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->checkEmpty()V

    return-void
.end method

.method static synthetic access$500(Lcom/htc/android/footprints/activity/EditLocationActivity;)[D
    .locals 1
    .parameter "x0"

    .prologue
    .line 17
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->getData()[D

    move-result-object v0

    return-object v0
.end method

.method private checkEmpty()V
    .locals 5

    .prologue
    .line 161
    iget-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditTexts:[Landroid/widget/EditText;

    .line 162
    .local v0, editTexts:[Landroid/widget/EditText;
    array-length v2, v0

    .line 163
    .local v2, size:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v2, :cond_1

    .line 164
    aget-object v3, v0, v1

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-interface {v3}, Landroid/text/Editable;->length()I

    move-result v3

    if-nez v3, :cond_0

    .line 165
    aget-object v3, v0, v1

    const-string v4, "0"

    invoke-virtual {v3, v4}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 163
    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 168
    :cond_1
    return-void
.end method

.method private getData()[D
    .locals 19

    .prologue
    .line 171
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLat:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v9

    .line 172
    .local v9, valueDegLat:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLat:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v11

    .line 173
    .local v11, valueMinLat:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatInt:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v13

    .line 174
    .local v13, valueSecLat1:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatDec:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v14

    .line 176
    .local v14, valueSecLat2:I
    const/16 v17, 0x59

    move v0, v9

    move/from16 v1, v17

    if-le v0, v1, :cond_0

    .line 177
    const/16 v9, 0x59

    .line 180
    :cond_0
    const/16 v17, 0x3b

    move v0, v11

    move/from16 v1, v17

    if-le v0, v1, :cond_1

    .line 181
    const/16 v11, 0x3b

    .line 184
    :cond_1
    const/16 v17, 0x3b

    move v0, v13

    move/from16 v1, v17

    if-le v0, v1, :cond_8

    .line 185
    const/16 v13, 0x3b

    .line 186
    const/4 v14, 0x0

    .line 191
    :cond_2
    :goto_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLon:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v10

    .line 192
    .local v10, valueDegLon:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLon:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v12

    .line 193
    .local v12, valueMinLon:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonInt:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v15

    .line 194
    .local v15, valueSecLon1:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonDec:Landroid/widget/EditText;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-static/range {v17 .. v17}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v16

    .line 196
    .local v16, valueSecLon2:I
    const/16 v17, 0xb3

    move v0, v10

    move/from16 v1, v17

    if-le v0, v1, :cond_3

    .line 197
    const/16 v10, 0xb3

    .line 200
    :cond_3
    const/16 v17, 0x3b

    move v0, v12

    move/from16 v1, v17

    if-le v0, v1, :cond_4

    .line 201
    const/16 v12, 0x3b

    .line 204
    :cond_4
    const/16 v17, 0x3b

    move v0, v15

    move/from16 v1, v17

    if-le v0, v1, :cond_9

    .line 205
    const/16 v15, 0x3b

    .line 206
    const/16 v16, 0x0

    .line 211
    :cond_5
    :goto_1
    new-instance v17, Ljava/lang/StringBuilder;

    invoke-direct/range {v17 .. v17}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, v17

    move v1, v9

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, ":"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    move-object/from16 v0, v17

    move v1, v11

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, ":"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    move-object/from16 v0, v17

    move v1, v13

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, "."

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    move-object/from16 v0, v17

    move v1, v14

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 212
    .local v7, strLat:Ljava/lang/String;
    new-instance v17, Ljava/lang/StringBuilder;

    invoke-direct/range {v17 .. v17}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, v17

    move v1, v10

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, ":"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    move-object/from16 v0, v17

    move v1, v12

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, ":"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    move-object/from16 v0, v17

    move v1, v15

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, "."

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    move-object/from16 v0, v17

    move/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    .line 214
    .local v8, strLon:Ljava/lang/String;
    const-wide/16 v3, 0x0

    .line 215
    .local v3, lat:D
    const-wide/16 v5, 0x0

    .line 217
    .local v5, lon:D
    :try_start_0
    invoke-static {v7}, Landroid/location/Location;->convert(Ljava/lang/String;)D

    move-result-wide v3

    .line 218
    invoke-static {v8}, Landroid/location/Location;->convert(Ljava/lang/String;)D
    :try_end_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-wide v5

    .line 225
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLat:Landroid/widget/Button;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/Button;->getText()Ljava/lang/CharSequence;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextS:Ljava/lang/String;

    move-object/from16 v18, v0

    invoke-virtual/range {v17 .. v18}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_6

    .line 226
    const-wide/high16 v17, -0x4010

    mul-double v3, v3, v17

    .line 228
    :cond_6
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLon:Landroid/widget/Button;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Landroid/widget/Button;->getText()Ljava/lang/CharSequence;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v17

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextW:Ljava/lang/String;

    move-object/from16 v18, v0

    invoke-virtual/range {v17 .. v18}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v17

    if-eqz v17, :cond_7

    .line 229
    const-wide/high16 v17, -0x4010

    mul-double v5, v5, v17

    .line 231
    :cond_7
    const/16 v17, 0x2

    move/from16 v0, v17

    new-array v0, v0, [D

    move-object/from16 v17, v0

    const/16 v18, 0x0

    aput-wide v3, v17, v18

    const/16 v18, 0x1

    aput-wide v5, v17, v18

    :goto_2
    return-object v17

    .line 187
    .end local v3           #lat:D
    .end local v5           #lon:D
    .end local v7           #strLat:Ljava/lang/String;
    .end local v8           #strLon:Ljava/lang/String;
    .end local v10           #valueDegLon:I
    .end local v12           #valueMinLon:I
    .end local v15           #valueSecLon1:I
    .end local v16           #valueSecLon2:I
    :cond_8
    const/16 v17, 0x3b

    move v0, v13

    move/from16 v1, v17

    if-ne v0, v1, :cond_2

    if-eqz v14, :cond_2

    .line 188
    const/4 v14, 0x0

    goto/16 :goto_0

    .line 207
    .restart local v10       #valueDegLon:I
    .restart local v12       #valueMinLon:I
    .restart local v15       #valueSecLon1:I
    .restart local v16       #valueSecLon2:I
    :cond_9
    const/16 v17, 0x3b

    move v0, v15

    move/from16 v1, v17

    if-ne v0, v1, :cond_5

    if-eqz v16, :cond_5

    .line 208
    const/16 v16, 0x0

    goto/16 :goto_1

    .line 220
    .restart local v3       #lat:D
    .restart local v5       #lon:D
    .restart local v7       #strLat:Ljava/lang/String;
    .restart local v8       #strLon:Ljava/lang/String;
    :catch_0
    move-exception v17

    move-object/from16 v2, v17

    .line 221
    .local v2, e:Ljava/lang/IllegalArgumentException;
    const-string v17, "EditLocationActivity"

    const-string v18, "Location.convert fail"

    invoke-static/range {v17 .. v18}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 222
    const-string v17, "EditLocationActivity"

    invoke-virtual {v2}, Ljava/lang/IllegalArgumentException;->getMessage()Ljava/lang/String;

    move-result-object v18

    invoke-static/range {v17 .. v18}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 223
    const/16 v17, 0x0

    goto :goto_2
.end method

.method private init()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 73
    const v1, 0x7f0a000b

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextN:Ljava/lang/String;

    .line 74
    const v1, 0x7f0a000c

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextE:Ljava/lang/String;

    .line 75
    const v1, 0x7f0a000e

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextW:Ljava/lang/String;

    .line 76
    const v1, 0x7f0a000d

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextS:Ljava/lang/String;

    .line 79
    const v1, 0x7f0c004c

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLat:Landroid/widget/EditText;

    .line 80
    const v1, 0x7f0c004d

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLat:Landroid/widget/EditText;

    .line 81
    const v1, 0x7f0c004e

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatInt:Landroid/widget/EditText;

    .line 82
    const v1, 0x7f0c004f

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatDec:Landroid/widget/EditText;

    .line 83
    const v1, 0x7f0c0051

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLon:Landroid/widget/EditText;

    .line 84
    const v1, 0x7f0c0052

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLon:Landroid/widget/EditText;

    .line 85
    const v1, 0x7f0c0053

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonInt:Landroid/widget/EditText;

    .line 86
    const v1, 0x7f0c0054

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonDec:Landroid/widget/EditText;

    .line 88
    const/16 v1, 0x8

    new-array v1, v1, [Landroid/widget/EditText;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLat:Landroid/widget/EditText;

    aput-object v2, v1, v4

    const/4 v2, 0x1

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLat:Landroid/widget/EditText;

    aput-object v3, v1, v2

    const/4 v2, 0x2

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatInt:Landroid/widget/EditText;

    aput-object v3, v1, v2

    const/4 v2, 0x3

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatDec:Landroid/widget/EditText;

    aput-object v3, v1, v2

    const/4 v2, 0x4

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLon:Landroid/widget/EditText;

    aput-object v3, v1, v2

    const/4 v2, 0x5

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLon:Landroid/widget/EditText;

    aput-object v3, v1, v2

    const/4 v2, 0x6

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonInt:Landroid/widget/EditText;

    aput-object v3, v1, v2

    const/4 v2, 0x7

    iget-object v3, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonDec:Landroid/widget/EditText;

    aput-object v3, v1, v2

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditTexts:[Landroid/widget/EditText;

    .line 91
    const v1, 0x7f0c0050

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLat:Landroid/widget/Button;

    .line 92
    const v1, 0x7f0c0055

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLon:Landroid/widget/Button;

    .line 93
    iget-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLat:Landroid/widget/Button;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onNewsClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 94
    iget-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLon:Landroid/widget/Button;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onNewsClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 96
    const v1, 0x7f0c0020

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonDone:Landroid/widget/Button;

    .line 97
    const v1, 0x7f0c0021

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/EditLocationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonCancel:Landroid/widget/Button;

    .line 98
    iget-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonDone:Landroid/widget/Button;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onDoneClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 99
    iget-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonCancel:Landroid/widget/Button;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->onCancelClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 102
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    .line 103
    .local v0, intent:Landroid/content/Intent;
    const-string v1, "LATITUDE"

    invoke-virtual {v0, v1, v4}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mLat:I

    .line 104
    const-string v1, "LONGITUDE"

    invoke-virtual {v0, v1, v4}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mLon:I

    .line 107
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->setData()V

    .line 108
    iget-object v1, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLat:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->requestFocus()Z

    .line 109
    return-void
.end method

.method private setData()V
    .locals 15

    .prologue
    .line 112
    iget v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mLat:I

    int-to-double v11, v11

    const-wide v13, 0x412e848000000000L

    div-double v0, v11, v13

    .line 113
    .local v0, lat:D
    iget v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mLon:I

    int-to-double v11, v11

    const-wide v13, 0x412e848000000000L

    div-double v4, v11, v13

    .line 115
    .local v4, lon:D
    const-wide/16 v11, 0x0

    cmpg-double v11, v0, v11

    if-gez v11, :cond_0

    .line 116
    const-wide/high16 v11, -0x4010

    mul-double/2addr v0, v11

    .line 117
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLat:Landroid/widget/Button;

    iget-object v12, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextS:Ljava/lang/String;

    invoke-virtual {v11, v12}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 119
    :cond_0
    const-wide/16 v11, 0x0

    cmpg-double v11, v4, v11

    if-gez v11, :cond_1

    .line 120
    const-wide/high16 v11, -0x4010

    mul-double/2addr v4, v11

    .line 121
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mButtonLon:Landroid/widget/Button;

    iget-object v12, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mTextW:Ljava/lang/String;

    invoke-virtual {v11, v12}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 124
    :cond_1
    const/4 v11, 0x2

    invoke-static {v0, v1, v11}, Landroid/location/Location;->convert(DI)Ljava/lang/String;

    move-result-object v3

    .line 125
    .local v3, latStr:Ljava/lang/String;
    const/4 v11, 0x2

    invoke-static {v4, v5, v11}, Landroid/location/Location;->convert(DI)Ljava/lang/String;

    move-result-object v7

    .line 128
    .local v7, lonStr:Ljava/lang/String;
    const-string v11, ":"

    invoke-virtual {v3, v11}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    .line 129
    .local v2, latArr:[Ljava/lang/String;
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLat:Landroid/widget/EditText;

    const/4 v12, 0x0

    aget-object v12, v2, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 130
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLat:Landroid/widget/EditText;

    const/4 v12, 0x1

    aget-object v12, v2, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 131
    const/4 v11, 0x2

    aget-object v11, v2, v11

    const-string v12, "\\."

    invoke-virtual {v11, v12}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v9

    .line 132
    .local v9, secStrN:[Ljava/lang/String;
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatInt:Landroid/widget/EditText;

    const/4 v12, 0x0

    aget-object v12, v9, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 133
    array-length v11, v9

    const/4 v12, 0x2

    if-lt v11, v12, :cond_2

    .line 134
    const/4 v11, 0x1

    aget-object v11, v9, v11

    invoke-virtual {v11}, Ljava/lang/String;->length()I

    move-result v11

    const/4 v12, 0x2

    if-le v11, v12, :cond_4

    .line 135
    const/4 v11, 0x1

    aget-object v11, v9, v11

    const/4 v12, 0x0

    const/4 v13, 0x2

    invoke-virtual {v11, v12, v13}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v10

    .line 136
    .local v10, tmpStr:Ljava/lang/String;
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatDec:Landroid/widget/EditText;

    invoke-virtual {v11, v10}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 144
    .end local v10           #tmpStr:Ljava/lang/String;
    :cond_2
    :goto_0
    const-string v11, ":"

    invoke-virtual {v7, v11}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v6

    .line 145
    .local v6, lonArr:[Ljava/lang/String;
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditDegLon:Landroid/widget/EditText;

    const/4 v12, 0x0

    aget-object v12, v6, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 146
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditMinLon:Landroid/widget/EditText;

    const/4 v12, 0x1

    aget-object v12, v6, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 147
    const/4 v11, 0x2

    aget-object v11, v6, v11

    const-string v12, "\\."

    invoke-virtual {v11, v12}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v8

    .line 148
    .local v8, secStrE:[Ljava/lang/String;
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonInt:Landroid/widget/EditText;

    const/4 v12, 0x0

    aget-object v12, v8, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 149
    array-length v11, v8

    const/4 v12, 0x2

    if-lt v11, v12, :cond_3

    .line 150
    const/4 v11, 0x1

    aget-object v11, v8, v11

    invoke-virtual {v11}, Ljava/lang/String;->length()I

    move-result v11

    const/4 v12, 0x2

    if-le v11, v12, :cond_5

    .line 151
    const/4 v11, 0x1

    aget-object v11, v8, v11

    const/4 v12, 0x0

    const/4 v13, 0x2

    invoke-virtual {v11, v12, v13}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v10

    .line 152
    .restart local v10       #tmpStr:Ljava/lang/String;
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonDec:Landroid/widget/EditText;

    invoke-virtual {v11, v10}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 158
    .end local v10           #tmpStr:Ljava/lang/String;
    :cond_3
    :goto_1
    return-void

    .line 139
    .end local v6           #lonArr:[Ljava/lang/String;
    .end local v8           #secStrE:[Ljava/lang/String;
    :cond_4
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLatDec:Landroid/widget/EditText;

    const/4 v12, 0x1

    aget-object v12, v9, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 155
    .restart local v6       #lonArr:[Ljava/lang/String;
    .restart local v8       #secStrE:[Ljava/lang/String;
    :cond_5
    iget-object v11, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditSecLonDec:Landroid/widget/EditText;

    const/4 v12, 0x1

    aget-object v12, v8, v12

    invoke-virtual {v11, v12}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 1
    .parameter "icicle"

    .prologue
    .line 46
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 47
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->requestWindowFeature(I)Z

    .line 48
    const v0, 0x7f03000b

    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->setContentView(I)V

    .line 49
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/EditLocationActivity;->init()V

    .line 50
    return-void
.end method

.method public onDestroy()V
    .locals 1

    .prologue
    .line 67
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditTexts:[Landroid/widget/EditText;

    .line 68
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 69
    return-void
.end method

.method public onResume()V
    .locals 5

    .prologue
    .line 54
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 55
    iget-object v0, p0, Lcom/htc/android/footprints/activity/EditLocationActivity;->mEditTexts:[Landroid/widget/EditText;

    .line 56
    .local v0, editTexts:[Landroid/widget/EditText;
    array-length v2, v0

    .line 57
    .local v2, size:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-ge v1, v2, :cond_0

    .line 58
    aget-object v3, v0, v1

    invoke-virtual {v3}, Landroid/widget/EditText;->isFocused()Z

    move-result v3

    if-eqz v3, :cond_1

    .line 59
    invoke-static {p0}, Lcom/htc/android/footprints/utils/ImeLauncher;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/ImeLauncher;

    move-result-object v3

    aget-object v4, v0, v1

    invoke-virtual {v3, v4}, Lcom/htc/android/footprints/utils/ImeLauncher;->show(Landroid/widget/EditText;)V

    .line 63
    :cond_0
    return-void

    .line 57
    :cond_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method
